class AddGeneralLinkoutsOct22 < ActiveRecord::Migration
  
  #Create several linkouts
  def self.up
    data_object1 = DataObject.create(:url=>"http://earthobservatory.nasa.gov/Study/Redtide/", :chapter=>Chapter.find_by_name("General information"), :data_provider => DataProvider.find_by_name("NASA"), :location => Location.find_by_name("Earth"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object2 = DataObject.create(:url=>"http://en.wikipedia.org/wiki/Red_tide", :chapter=>Chapter.find_by_name("General information"), :data_provider => DataProvider.find_by_name("Wikipedia"), :location => Location.find_by_name("Earth"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object3 = DataObject.create(:url=>"http://www.nal.usda.gov/wqic/pfiest.shtml", :chapter=>Chapter.find_by_name("Links"), :data_provider => DataProvider.find_by_name("USDA"), :location => Location.find_by_name("Earth"), :taxon=>Taxon.find_by_name("Pfiesteria piscicida"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object4 = DataObject.create(:url=>"http://www.cop.noaa.gov/stressors/extremeevents/hab/current/fact-ev_resp.html", :chapter=>Chapter.find_by_name("Research"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object5 = DataObject.create(:url=>"http://www.csc.noaa.gov/crs/habf/", :chapter=>Chapter.find_by_name("Monitoring"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object6 = DataObject.create(:url=>"http://coastwatch.noaa.gov/hab/bulletins_ns.htm", :chapter=>Chapter.find_by_name("Monitoring"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object7 = DataObject.create(:url=>"http://www.nero.noaa.gov/nero/hotnews/redtide/", :chapter=>Chapter.find_by_name("Fisheries closures (federal)"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object8 = DataObject.create(:url=>"http://oceanservice.noaa.gov/redtide/supp_moreaboutredtide.html", :chapter=>Chapter.find_by_name("Links"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object9 = DataObject.create(:url=>"http://oceanservice.noaa.gov/education/classroom/lessons/07_algal_algae.pdf", :chapter=>Chapter.find_by_name("Educational resource"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object10 = DataObject.create(:url=>"http://oceanservice.noaa.gov/topics/coasts/hab/welcome.html", :chapter=>Chapter.find_by_name("General information"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object11 = DataObject.create(:url=>"http://habsos.noaa.gov/gis-mapping", :chapter=>Chapter.find_by_name("Bloom information"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object12 = DataObject.create(:url=>"http://habsos.noaa.gov/whats-the-problem", :chapter=>Chapter.find_by_name("HABCRA"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object13 = DataObject.create(:url=>"http://habsos.noaa.gov/", :chapter=>Chapter.find_by_name("General information"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object14 = DataObject.create(:url=>"http://habsos.noaa.gov/related-links", :chapter=>Chapter.find_by_name("Links"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object15 = DataObject.create(:url=>"http://www.cop.noaa.gov/stressors/extremeevents/hab/habhrca/", :chapter=>Chapter.find_by_name("HABCRA"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object16 = DataObject.create(:url=>"http://www.chbr.noaa.gov/pmn/", :chapter=>Chapter.find_by_name("HABs in the news"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object17 = DataObject.create(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/phytoplankton/index.html", :chapter=>Chapter.find_by_name("General information"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object18 = DataObject.create(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/phytoplankton/algal_dynamics.html", :chapter=>Chapter.find_by_name("Dynamics of blooms (General information)"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object19 = DataObject.create(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/marine_biotoxins/index.html", :chapter=>Chapter.find_by_name("Toxin general information"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object20 = DataObject.create(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/marine_biotoxins/detection/index.html", :chapter=>Chapter.find_by_name("Toxin detection (general info)"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object21 = DataObject.create(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/marine_biotoxins/detection/elisa.html", :chapter=>Chapter.find_by_name("Toxin detection (ELISA)"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object22 = DataObject.create(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/marine_biotoxins/detection/hplc.html", :chapter=>Chapter.find_by_name("Toxin detection (HPLC)"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object23 = DataObject.create(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/marine_biotoxins/detection/rba.html", :chapter=>Chapter.find_by_name("Toxin detection (RBA)"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object24 = DataObject.create(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/hab_species/index.html", :chapter=>Chapter.find_by_name("General information"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Alexandrium catenella"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
    data_object25 = DataObject.create(:url=>"http://www.nwfsc.noaa.gov/hab/links/index.html", :chapter=>Chapter.find_by_name("Links"), :data_provider => DataProvider.find_by_name("NOAA"), :location => Location.find_by_name("USA"), :taxon=>Taxon.find_by_name("Algae"),:toxin=>nil, :bookend_start=>"Not applicable", :bookend_end=>"Not applicable", :harmful_effect=>nil)
  end

  def self.down
    DataObject.destroy_all(:url=>"http://earthobservatory.nasa.gov/Study/Redtide/")
    DataObject.destroy_all(:url=>"http://en.wikipedia.org/wiki/Red_tide")
    DataObject.destroy_all(:url=>"http://www.nal.usda.gov/wqic/pfiest.shtml")
    DataObject.destroy_all(:url=>"http://www.cop.noaa.gov/stressors/extremeevents/hab/current/fact-ev_resp.html")
    DataObject.destroy_all(:url=>"http://www.csc.noaa.gov/crs/habf/")
    DataObject.destroy_all(:url=>"http://coastwatch.noaa.gov/hab/bulletins_ns.htm")
    DataObject.destroy_all(:url=>"http://www.nero.noaa.gov/nero/hotnews/redtide/")
    DataObject.destroy_all(:url=>"http://oceanservice.noaa.gov/redtide/supp_moreaboutredtide.html")
    DataObject.destroy_all(:url=>"http://oceanservice.noaa.gov/education/classroom/lessons/07_algal_algae.pdf")
    DataObject.destroy_all(:url=>"http://oceanservice.noaa.gov/topics/coasts/hab/welcome.html")
    DataObject.destroy_all(:url=>"http://habsos.noaa.gov/gis-mapping")
    DataObject.destroy_all(:url=>"http://habsos.noaa.gov/whats-the-problem")
    DataObject.destroy_all(:url=>"http://habsos.noaa.gov/")
    DataObject.destroy_all(:url=>"http://habsos.noaa.gov/related-links")
    DataObject.destroy_all(:url=>"http://www.cop.noaa.gov/stressors/extremeevents/hab/habhrca/")
    DataObject.destroy_all(:url=>"http://www.chbr.noaa.gov/pmn/")
    DataObject.destroy_all(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/phytoplankton/index.html")
    DataObject.destroy_all(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/phytoplankton/algal_dynamics.html")
    DataObject.destroy_all(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/marine_biotoxins/index.html")
    DataObject.destroy_all(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/marine_biotoxins/detection/index.html")
    DataObject.destroy_all(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/marine_biotoxins/detection/elisa.html")
    DataObject.destroy_all(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/marine_biotoxins/detection/hplc.html")
    DataObject.destroy_all(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/marine_biotoxins/detection/rba.html")
    DataObject.destroy_all(:url=>"http://www.nwfsc.noaa.gov/hab/habs_toxins/hab_species/index.html")
    DataObject.destroy_all(:url=>"http://www.nwfsc.noaa.gov/hab/links/index.html")
  end
end
